# Maintainer: Fabian Bornschein <fabiscafe@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>


pkgname=libgedit-amtk
pkgver=5.8.0
pkgrel=1
pkgdesc="Actions, Menus and Toolbars Kit for GTK applications'"
arch=("loong64" "x86_64")
url="https://gedit-technology.net/"
license=('LGPL3')
groups=()
depends=(
  glib2
  glibc
  gtk3
)
makedepends=(
  git
  gobject-introspection
  gtk-doc
  meson
)
provides=(libgedit-amtk-5.so)
conflicts=(amtk)
_commit=f6fbfd1c57de3d97cab2056a5c3088b0da49e8a4  # tags/5.8.0^0
source=("git+https://github.com/gedit-technology/libgedit-amtk.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
